using ASP;
using HoWave.Common;
using System;
using System.Data;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class Store_ShopTemplate : Page, IRequiresSessionState
{
	protected HiddenField HiddenCSSID;
	protected HtmlForm form1;
	public int ShopID = 0;
	public int cssID = 1;
	public string UserName = "未知";
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		if (base.Request.QueryString["ShopID"] != null)
		{
			try
			{
				this.ShopID = int.Parse(base.Request.QueryString["ShopID"]);
			}
			catch (Exception ex)
			{
				ex.WriteErrorLog(new string[]
				{
					"正常操作"
				});
				this.ShopID = 0;
			}
		}
		if (base.Request.QueryString["cssID"] != null)
		{
			try
			{
				this.cssID = int.Parse(base.Request.QueryString["cssID"]);
			}
			catch (Exception ex)
			{
				ex.WriteErrorLog(new string[]
				{
					"正常操作"
				});
				this.cssID = 1;
			}
		}
		Conn conn = new Conn();
		DataTable dataTable = conn.GetDataTable("select ShopOwnerName from HLShop_Shop where ShopID=" + this.ShopID);
		if (dataTable != null && dataTable.Rows.Count > 0)
		{
			this.UserName = dataTable.Rows[0]["ShopOwnerName"].ToString();
		}
		dataTable.Dispose();
		this.HiddenCSSID.Value = this.cssID.ToString();
	}
}
